import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/index'
  },
  {
    path : '/index',
    name : 'index',
    component : ()=>import('../views/IndexView.vue')
  },
  {
    path : '/admin_index',
    name : 'admin_index',
    component : ()=>import('../views/admin/Admin_indexView.vue')
  },
    // 展示所有项目
  {
    path : '/showProject',
    name : 'showProject',
    component : ()=>import('../views/admin/ProductsView.vue')
  },
      // 项目详情
      {
        path : '/productInfo',
        name : 'productInfo',
        component : ()=>import('../views/admin/ProductInfoView.vue')
      },
   // 所有分类
  {
    path : '/all_classity',
    name : 'all_classity',
    component : ()=>import('../views/admin/classify/All_classityView.vue')
  },
    // 添加分类
    {
    path : '/add_classity',
    name : 'add_classity',
    component : ()=>import('../views/admin/classify/Add_classity.vue')
  },
  // 后台管理登录
  {
    path : '/admin_login',
    name : 'admin_login',
    component : ()=>import('../views/admin/Admin_loginView.vue')
  },
  {
    path : '/gyzc-list',
    name : 'gyzc-list',
    component : ()=>import('../views/Gyzc-listView.vue')
  },
  {
    path : '/cop',
    name : 'cop',
    component : ()=>import('../views/CopView.vue')
  },
  {
    path : '/ly-list',
    name : '/ly-list',
    component : ()=>import('../views/Ly-listView.vue')
  },
  {
    path : '/new_info',
    name : 'new_info',
    component : ()=>import('../views/New_infoView.vue')
  },
  {
    path : '/new_product',
    name : 'new_product',
    component : ()=>import('../views/New_product.vue')
  },
  {
    path : '/new_detail',
    name : 'new_detail',
    component : ()=>import('../views/New_detailView.vue')
  },
  {
    path : '/new_back',
    name : 'new_back',
    component : ()=>import('../views/New_backView.vue')
  },
  //登陆
  {
    path : '/login',
    name : 'login',
    component : ()=>import('../views/LoginView.vue')
  },
  //注册
  {
    path : '/reg',
    name : 'reg',
    component : ()=>import('../views/RegView.vue')
  },
  // 个人中心
  {
    path : '/user',
    name : 'user',
    component : ()=>import('../views/UserView.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
